<div class="kbn-timepicker">

  <div class="tab-content kbn-timepicker-content">
    <!-- Filters -->
    <div ng-show="activeTab === 'filter'" role="tabpanel" class="tab-pane active">
      <div class="kbn-timepicker-title kuiVerticalRhythmSmall">
        <h2 class="kuiLocalDropdownTitle kbn-timepicker-title__text">
          Time Range
        </h2>

        <div
          role="tablist"
          class="kbn-timepicker-modes kbn-timepicker-title__section"
        >
          <a
            id="timepickerQuick"
            role="tab"
            class="kbn-timerpicker-nav-button"
            ng-class="{active: mode === 'quick' }"
            ng-click="setMode('quick')"
            aria-selected="{{mode === 'quick'}}"
            kbn-accessible-click
          >
            Quick
          </a>

          <a
            id="timepickerRelative"
            role="tab"
            class="kbn-timerpicker-nav-button"
            ng-class="{active: mode === 'relative' }"
            ng-click="setMode('relative')"
            aria-selected="{{mode === 'relative'}}"
            kbn-accessible-click
          >
            Relative
          </a>

          <a
            id="timepickerAbsolute"
            role="tab"
            class="kbn-timerpicker-nav-button"
            ng-class="{active: mode === 'absolute' }"
            ng-click="setMode('absolute')"
            aria-selected="{{mode === 'absolute'}}"
            kbn-accessible-click
          >
            Absolute
          </a>
        </div>
      </div>

      <div
        class="kuiVerticalRhythmSmall"
        ng-switch
        on="mode"
      >
        <kbn-timepicker-quick-panel
          ng-switch-when="quick"
          set-quick="setQuick(from, to)"
          role="tabpanel"
          aria-labelledby="timepickerQuick"
        ></kbn-timepicker-quick-panel>

        <kbn-timepicker-relative-panel
          ng-switch-when="relative"
          apply-relative="applyRelative()"
          check-relative="checkRelative()"
          format-relative="formatRelative(key)"
          relative="relative"
          relative-options="relativeOptions"
          set-relative-to-now="setRelativeToNow(key)"
          units="units"
          role="tabpanel"
          aria-labelledby="timepickerRelative"
        ></kbn-timepicker-relative-panel>

        <kbn-timepicker-absolute-panel
          ng-switch-when="absolute"
          absolute="absolute"
          apply-absolute="applyAbsolute()"
          format="format"
          pick-from-date="pickFromDate"
          pick-to-date="pickToDate"
          set-to-now="setToNow(key)"
          role="tabpanel"
          aria-labelledby="timepickerAbsolute"
        ></kbn-timepicker-absolute-panel>
      </div>
    </div>

    <!-- Refresh Intervals -->
    <div ng-show="activeTab === 'interval'" role="tabpanel" class="tab-pane active">
      <h2 class="kuiLocalDropdownTitle">
        Refresh Interval
      </h2>

      <div ng-repeat="list in refreshLists" class="kbn-refresh-section">
        <ul class="list-unstyled">
          <li ng-repeat="inter in list">
            <a
              class="refresh-interval"
              ng-class="{ 'refresh-interval-active': interval.value === inter.value }"
              ng-click="setRefreshInterval(inter)"
              kbn-accessible-click
            >
              {{inter.display}}
            </a>
          </li>
        </ul>
      </div>
    </div>
  </div>
</div>
